package com.example.springboot.config.event.generic;

import com.example.springboot.bean.Department;
import com.example.springboot.pojo.Person;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author chenzhangkun
 * @ClassName BaseEventListenerService
 * @description: TODO
 * @date 2024年01月18日
 */
@Slf4j
@Component
public class BaseEventListenerService {
    @EventListener
    public void handlePersonEvent(BaseEvent<Person> personBaseEvent) {
        log.info("personBaseEvent=====");
    }

    @EventListener
    public void handleDepartmentEvent(BaseEvent<Department> departmentBaseEvent) {
        log.info("departmentBaseEvent=====");
    }
}
